home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # preinst script for libmtp
-
- set -e
-
- PACKAGE=libmtp8
-
- # Move a conffile without triggering a dpkg question
- mv_conffile() {
- OLDCONFFILE="$1"
- NEWCONFFILE="$2"
- if [ -e "$OLDCONFFILE" ]; then
- echo "Preserving user changes to $NEWCONFFILE ..."
- mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
- mv -f "$OLDCONFFILE" "$NEWCONFFILE"
- fi
- }
-
- case "$1" in
- configure)
- if dpkg --compare-versions "$2" lt-nl 0.2.6.1-2ubuntu1 ; then
- mv_conffile /etc/udev/libmtp8.rules \
- /etc/udev/rules.d/45-libmtp8.rules
- fi
-
- esac
-
- # Automatically added by dh_makeshlibs
- if [ "$1" = "configure" ]; then
- ldconfig
- fi
- # End automatically added section
-
-
- exit 0
-